<?php
include("../config.php");
include("../inc/func.php");
include("../db.php");
$debug = TRUE;
loginCheck();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php site_title();?> Control Panel - Themes</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="wrap">
  <div id="head">
    <div id="title"><?php site_title(); ?><div class="gotosite"> <a href="../">Go to your site &raquo;</a></div></div>
  </div>
  <div id="nav">
    <ul>
      <li><a href="index.php">Main</a></li>
      <li><a href="post.php">Post</a></li>
      <li><a href="manage.php">Manage</a></li>
      <li class="current"><a href="theme.php">Themes</a></li>
      <li><a href="options.php">Options</a></li>
    </ul>
  </div>
  <div id="content">
  <?php
  if(isset($_GET['choose'])) {
	  $new = $_GET['choose'];
	  $query = "UPDATE `$db_prefix"."main` SET `value` = '$new' WHERE `$db_prefix"."main`.`id` =3 LIMIT 1 ;";
	  mysql_query($query) or die('Error, insert query failed');
	  echo '<div id="success">Skin changed successfully</div>';
  }
  else {}
  ?>
    <div class="skinhead">Current Skin</div>
    <div id="currentskin"><?php skin_descript() ?></div>
    <br /><br />
    <div class="skinhead">Other skins</div>
    <div id="skins">
	<?php get_skins(); ?>
	</div>
  </div><br />
  <div id="footer"><?php LIversion(); ?></div>
</div>
</body>
</html>
